package operations;

import book.Book;
import book.BookList;

import java.util.Scanner;

public class AddOperation implements IOperation {
    public void work(BookList bookList){
        System.out.println("新增");
        System.out.println("请输入：name，author，type，price");
        Scanner scanner = new Scanner(System.in);
        String name = scanner.nextLine();
        String author = scanner.nextLine();
        String type = scanner.nextLine();
        int price = scanner.nextInt();
        Book book = new Book(name,author,price,type);
        bookList.add(book);
    }


}
